// HR, 12/95. Updated and revised for Igor Pro 3.0.
// Used rtGlobals and data folders to store globals.
// Changed all macros into functions. Then added dialog routines (e.g., MakeSamplePeriodicDialog).
Function/S SetMakeSampleDataFolderCurrent() // Returns previous current data folder.
String dfSav = GetDataFolder(1)
NewDataFolder/O/S root:Packages // Put our data folder in standard packages data folder.
NewDataFolder/O/S :'Make Sample Data'
return dfSav
End
Function MakeSampleDataGeneralGlobals()
String dfSav = SetMakeSampleDataFolderCurrent()
if (exists("gNumPoints") == 0)
Variable/G gNumPoints = 500
Variable/G gXMin = 0
Variable/G gXMax = 6
Variable/G gPercentXNoise = 0
Variable/G gPercentYNoise = 0
Variable/G gAutoDisplay = 1
endif
SetDataFolder dfSav
End
Function SetSampleDataSettings(numPoints, xMin, xMax, percentXNoise, percentYNoise, autoDisplay)
Variable numPoints // Number of points in output waves
Variable xMin
Variable xMax
Variable percentXNoise
Variable percentYNoise
Variable autoDisplay // 1 = yes, 2 = no
String dfSav = SetMakeSampleDataFolderCurrent()
MakeSampleDataGeneralGlobals()
Variable/G gNumPoints, gXMin, gXMax, gPercentXNoise, gPercentYNoise, gAutoDisplay // This just creates NVAR references. The variables were created above.